package tmallsc

import (
	"encoding/xml"
	"sync"

	"github.com/bububa/opentaobao/model"
)

// TmallServicecenterServicestoreUpdateservicestorecapacityAPIResponse 更新网点容量 API返回值
// tmall.servicecenter.servicestore.updateservicestorecapacity
//
// 更新网点容量，唯一性校验：服务商淘宝账号+网点编码+biz_type
// 前提是网点要存在，
// 如果需要更新的网点容量不存在，会更新失败。
// 网点容量包含了业务类型(比如电器预约安装)、天猫服务的servicecode列表、类目区域和容量
type TmallServicecenterServicestoreUpdateservicestorecapacityAPIResponse struct {
	model.CommonResponse
	TmallServicecenterServicestoreUpdateservicestorecapacityAPIResponseModel
}

// Reset 清空结构体
func (m *TmallServicecenterServicestoreUpdateservicestorecapacityAPIResponse) Reset() {
	(&m.CommonResponse).Reset()
	(&m.TmallServicecenterServicestoreUpdateservicestorecapacityAPIResponseModel).Reset()
}

// TmallServicecenterServicestoreUpdateservicestorecapacityAPIResponseModel is 更新网点容量 成功返回结果
type TmallServicecenterServicestoreUpdateservicestorecapacityAPIResponseModel struct {
	XMLName xml.Name `xml:"tmall_servicecenter_servicestore_updateservicestorecapacity_response"`
	// 平台颁发的每次请求访问的唯一标识
	RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
	// result
	Result *ResultBase `json:"result,omitempty" xml:"result,omitempty"`
}

// Reset 清空结构体
func (m *TmallServicecenterServicestoreUpdateservicestorecapacityAPIResponseModel) Reset() {
	m.RequestId = ""
	m.Result = nil
}

var poolTmallServicecenterServicestoreUpdateservicestorecapacityAPIResponse = sync.Pool{
	New: func() any {
		return new(TmallServicecenterServicestoreUpdateservicestorecapacityAPIResponse)
	},
}

// GetTmallServicecenterServicestoreUpdateservicestorecapacityAPIResponse 从 sync.Pool 获取 TmallServicecenterServicestoreUpdateservicestorecapacityAPIResponse
func GetTmallServicecenterServicestoreUpdateservicestorecapacityAPIResponse() *TmallServicecenterServicestoreUpdateservicestorecapacityAPIResponse {
	return poolTmallServicecenterServicestoreUpdateservicestorecapacityAPIResponse.Get().(*TmallServicecenterServicestoreUpdateservicestorecapacityAPIResponse)
}

// ReleaseTmallServicecenterServicestoreUpdateservicestorecapacityAPIResponse 将 TmallServicecenterServicestoreUpdateservicestorecapacityAPIResponse 保存到 sync.Pool
func ReleaseTmallServicecenterServicestoreUpdateservicestorecapacityAPIResponse(v *TmallServicecenterServicestoreUpdateservicestorecapacityAPIResponse) {
	v.Reset()
	poolTmallServicecenterServicestoreUpdateservicestorecapacityAPIResponse.Put(v)
}
